package com.kksoft.android.xiaoliaobaike.model;

import net.tsz.afinal.annotation.sqlite.Id;
import net.tsz.afinal.annotation.sqlite.Table;
import net.tsz.afinal.annotation.sqlite.Transient;

/**
 * 采集任务
 * 
 * @author KK
 */
@Table(name = "fetch_task")
public class FetchTask {

	@Transient
	public static final int TYPE_SERIES = 1;
	@Transient
	public static final int TYPE_ARTICLE = 2;

	@Transient
	public static final int STATE_IDLE = 0;
	@Transient
	public static final int STATE_START = 1;
	@Transient
	public static final int STATE_ANALYSIS = 2;
	@Transient
	public static final int STATE_FINISH = 3;
	@Transient
	public static final int STATE_ERROR = -1;

	@Id
	private Integer id;
	private int type;
	private Integer seriesId;
	private Integer articleId;
	private String title;
	private String url;
	private int page;
	private int state;
	private String msg;
	private long startTime;
	private long finishTime;
	
	public FetchTask() {

	}

	public FetchTask(Integer id, int type, Integer seriesId, Integer articleId, String title, String url, int page, int state, String msg, int startTime, int finishTime) {
		super();
		this.id = id;
		this.type = type;
		this.seriesId = seriesId;
		this.articleId = articleId;
		this.title = title;
		this.url = url;
		this.page = page;
		this.state = state;
		this.msg = msg;
		this.startTime = startTime;
		this.finishTime = finishTime;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public Integer getSeriesId() {
		return seriesId;
	}

	public void setSeriesId(Integer seriesId) {
		this.seriesId = seriesId;
	}

	public Integer getArticleId() {
		return articleId;
	}

	public void setArticleId(Integer articleId) {
		this.articleId = articleId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(long finishTime) {
		this.finishTime = finishTime;
	}

}